
#include <sys/cdefs.h>
__RCSID("$ : atomic_simplelock.c,v 1.2 2013/08/16 01:47:41 matt Exp $");

#include <sys/types.h>

#if !defined(_ARM_ARCH_T2)
/*
 * We need to use the inlines so redefine out of the way.
 */
#define	__cpu_simple_lock	__arm_simple_lock
#define	__cpu_simple_lock_try	__arm_simple_lock_try
#include <arm/lock.h>
/*
 * Now get rid of them.
 */
#undef __cpu_simple_lock
#undef __cpu_simple_lock_try

/*
 * Since we overrode lock.h we have to provide these ourselves.
 */
#ifdef __LIBPTHREAD_SOURCE__
__dso_hidden void __cpu_simple_lock(__cpu_simple_lock_t *);
__dso_hidden int __cpu_simple_lock_try(__cpu_simple_lock_t *);
#else
void __cpu_simple_lock(__cpu_simple_lock_t *);
int __cpu_simple_lock_try(__cpu_simple_lock_t *);
#endif

void
__cpu_simple_lock(__cpu_simple_lock_t *alp)
{

	__arm_simple_lock(alp);
}

int
__cpu_simple_lock_try(__cpu_simple_lock_t *alp)
{

	return __arm_simple_lock_try(alp);
}
#endif
